package com.qf.fallback;/*
 *保护你的大熊
 *2021/12/21
 *16:59
 */

import com.qf.feign.GoodsFeign;
import feign.hystrix.FallbackFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class GoodsFallbackFactory implements FallbackFactory<GoodsFeign> {

    @Autowired
    GoodsFallback goodsFallback;

    @Override
    public GoodsFeign create(Throwable cause) {
        cause.printStackTrace();
        return goodsFallback;
    }
}
